package com.zzt.zt_hilt.Module;

import android.util.Log;

import com.zzt.zt_hilt.entity.tools;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import dagger.hilt.InstallIn;
import dagger.hilt.android.qualifiers.ApplicationContext;
import dagger.hilt.components.SingletonComponent;

/**
 * @author: zeting
 * @date: 2022/8/30
 */
@InstallIn(SingletonComponent.class)
@Module
public class toolsModule {
    private static final String TAG = "Hilt Tools Module";

    @Provides // 暴露对象
    @Singleton//上方是ApplicationComponent用这个注解，作用是保持全局单例
    public tools getTools() {
        Log.d(TAG, "Tools Module 初始化");
        return new tools();
    }
}
